-- By ScatmanJosh --

-- 0 = NOBODY. 1 = EVERYBODY. 2 = ADMINS --
-- SUPERS AND UP AUTO BYPASS EVERYTHING --

-- Init --
XEN = XEN or {}
local PLAYER = FindMetaTable( "Player" )

-- Sourpatch --
XEN.Sourpatch = {
	CanPunt = 0,
	CanPickup = 1,
	CanTool = 1,
	CanToolWorld = 1,
	CanPickupOthers = 2,
	CanToolOthers = 2,
	CanNoclip = 2,
	CanBypassToolblock = 0,
	CanBypassModelBlock = 0,
	CanBypassAntispawn = 2
}

-- Functions --
function XEN.Sourpatch:GetFilter( filter ) --FILTER:STRING = CAN BE ANY FILTER FROM ABOVE.
	if XEN.TableHasValue( self, filter ) then return self[ filter ]
	else return nil end
end

function XEN.Sourpatch:SetFilter( filter, val ) --FILTER:STRING( read above ). VAL:NUMBER = 0, 1 or 2.
	if XEN.TableHasValue( self, filter ) and val >= 0 and val <= 2 then
		self[ filter ] = val
		return filter, self[ filter ]
	else
		return nil, -1
	end
end